package de.hska.reka.websockets.Parser;

import java.io.IOException;

import org.codehaus.jackson.JsonNode;
import org.codehaus.jackson.JsonParseException;
import org.codehaus.jackson.map.JsonMappingException;
import org.codehaus.jackson.map.ObjectMapper;

public class JsonRPCParser {
	private ObjectMapper mapper = new ObjectMapper();
	
	public String parseMethodControllerName(String jsonRawString) throws JsonParseException, JsonMappingException, IOException {
		return mapper.readValue(jsonRawString,
				JsonNode.class).get("method").getValueAsText();
	}
}
